<style type="text/css">
    .icon i {font-size: 20px;color: #3399FF}
    .Validform_wrong {display: none}
</style>
<script type="text/javascript">
    Do('base', 'layer', 'form', function () {
        $('#form').isForm();
        var i = $('[name="values_id[]"]').length;
        $("#add_attr").click(function () {
            i++;
            var html = "<tr><th></th><td class='input-group'>" +
                "<input class='input w100' datatype='*' type='text' name='title[]' placeholder='模板标题' />" +
                "<select class='select' name='types[]'><option value='text' selected>文本输入</option><option value='number'>整数数字</option><option value='digit'>小数点数字</option><option value='idcard'>身份证输入</option><option value='data'>年月日时间</option><option value='selector'>选择器</option></select>" +
                "<input class='input w300' type='text' name='placeholder[]' placeholder='提示语' />" +
                "<span class='fn-cp ml5' onclick='remove_attr(this)'><i class='iconfont icon-reduce_icon'></i></span><br />" +
                "<input class='input w500 mt5' type='text' name='values[]' placeholder='默认值,多个以|线分开' /></td></tr>";
            $("#attr").append(html);
        });
    })
    function remove_attr(css) {
        $(css).parents("tr").remove();
    }
</script>